<?php
$arr = [
    [
        'name' => 'home',
        'text' => '报名',
        'img' => 'navigate-filled',
        'path' => '/pages/Sign',
        'appId' => ''
    ],
    [
        'name' => 'examine',
        'text' => '做题',
        'img' => 'notification-filled',
        'path' => '/pages/Index?aa=bb&cc=dd',
        'appId' => ''
    ],
    [
        'name' => 'task',
        'text' => '任务',
        'img' => 'notification-filled',
        'path' => '/pages/Task',
        'appId' => ''
    ],
    [
        'name' => 'my',
        'text' => '我的',
        'img' => 'person-filled',
        'path' => '/pages/My',
        'appId' => ''
    ],
];
function success($info, $data = [], $code = 1): void
{
    header('Content-Type:application/json; charset=utf-8');
    $result = ['code' => $code, 'info' => $info, 'data' => $data];
    echo json_encode($result);
    die();
}

echo success('success', $arr);
?>
